﻿#define MyAppName "多功能工具"
#define MyAppNameExt "XMultiTool"
#define MyAppExeName "XMultiTool.exe"
#define ExeplorerName "explorer.exe"
#define CmdName "cmd.exe"    
#define MyAppPublisher "soda"
#define SourcePath "bin/"
#define MyAppVersion GetVersionNumbersString(AddBackslash(SourcePath) + "XMultiTool.exe")
#define MyAppID ""
#define MyAppLicenseURL "https://www.baidu.com"
#define AnycubicWebsiteURL "https://www.baidu.com"
; 安装目录至少需要的空间 100; 100 MB，TODO 要获取一些Minisize 之类的来计算，这里先写死
#define MyAppNeedSpaceByte 10737418240

[Setup]
ArchitecturesInstallIn64BitMode =   x64 ia64
AppName                         =   {#MyAppName}
AppVerName                      =   {#MyAppName} {#MyAppVersion}
VersionInfoVersion              =   {#MyAppVersion}
AppPublisher                    =   {#MyAppPublisher}
VersionInfoCopyright            =   {#MyAppPublisher}
VersionInfoDescription          =   {#MyAppName}
VersionInfoProductVersion       =   {#MyAppVersion}
DefaultDirName={commonpf}/{#MyAppNameExt}
DefaultGroupName                =   {#MyAppName}
OutputDir                       =   .
OutputBaseFilename=XMultiTool_package
SetupIconFile=../MainWindow/assets/image_icon/xmultitool.ico
Compression                     =   lzma
SolidCompression                =   yes
DisableWelcomePage              =   no
Uninstallable                   =   yes
UninstallDisplayIcon            =   {app}\{#MyAppExeName}
UninstallDisplayName            =   {#MyAppName}
UsePreviousAppDir               =   no
ChangesAssociations             =   yes
DisableProgramGroupPage         =   yes
DisableDirPage                  =   yes
DisableReadyMemo                =   yes
DisableReadyPage                =   yes
TimeStampsInUTC                 =   yes
ShowLanguageDialog              =   no
UsePreviousLanguage             =   no
LanguageDetectionMethod         =   none

[Icons]
Name:"{group}\{#MyAppName}";Filename:"{app}\{#MyAppExeName}"
Name:"{commondesktop}\{#MyAppName}";Filename:"{app}\{#MyAppExeName}";Tasks:desktopicon

[Languages]
;英文语言
    Name: "en"; MessagesFile: "compiler:Languages\English.isl";
;简体语言
    Name: "cn"; MessagesFile: "compiler:Languages\ChineseSimplified.isl";

[CustomMessages]
    ;此段条目在等号后面直接跟具体的值，不能加双引号
    ;English（默认语言）
    en.app_name                             =XMutiTool
    en.install_name                         =Install Now
    en.install_path_required                =Installation Path: Required:
    en.available                            =Available
    en.tipii                                =The installation path is invalid!
    en.tdssi                                =The disk space selected is less than the space required by the application!
    en.tshbi                                =The software has been installed and directory replacement is not allowed!
    en.browser                              =Browser...
    en.more_options                         =More Options
    en.installing                           =Installing...
    en.upta                                 =Updating the application...
    en.run_now                              =Run Now
    en.ihraat                               =I have read and agree to
    en.tula                                 =《The User License Agreement》
    en.siapwn                               =Stop installing XMutiTool now?
    en.tipaey                               =The installation path already exists. would you like to install to that folder anyway?
    en.yiapwi                               =You’ve installed XMutiTool in your system. Do you want to cover it?
    en.yuapwp                               =You’re using XMutiTool, Please close it and try again.
    en.ok                                   =OK
    en.yes                                  =Yes
    en.no                                   =No
    en.continue                             =Continue
    en.teminate                             =Teminate
    en.updateFailedTitle                    =Application update failed
    en.updateFailedDisc                     =Please try to download and manually install the latest version from
    en.updateFailedLink                     =Anycubic website  

    ;简体中文
    cn.app_name                             =多功能工具
    cn.install_name                         =一键安装
    cn.install_path_required                =安装路径: 要求:
    cn.available                            =可用:
    cn.tipii                                =安装目录不可用!
    cn.tdssi                                =路径空间太少!
    cn.tshbi                                =软件已经安装，不允许更换目录!
    cn.browser                              =更改目录...
    cn.more_options                         =自定义安装
    cn.installing                           =正在安装...
    en.upta                                 =正在更新程序...
    cn.run_now                              =立即启动
    cn.ihraat                               =我同意
    cn.tula                                 =《用户协议》
    cn.siapwn                               =要停止安装么?
    cn.tipaey                               =已存在，依然安装么?
    cn.yiapwi                               =已安装，要覆盖么?
    cn.yuapwp                               =软件正在打开，请关闭后重试。
    cn.ok                                   =确定
    cn.yes                                  =是
    cn.no                                   =否
    cn.continue                             =继续安装
    cn.teminate                             =终止安装
    cn.updateFailedTitle                    =升级失败
    cn.updateFailedDisc                     =请手动下载安装
    cn.updateFailedLink                     =下载地址  

[Tasks]
    Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}";
    Name: "quicklaunchicon"; Description: "{cm:CreateQuickLaunchIcon}"; GroupDescription: "{cm:AdditionalIcons}";

[Files]
    Source: ".\inno_temp\*"; DestDir: "{tmp}"; Flags: dontcopy solidbreak nocompression; Attribs: hidden system
    Source: "{#SourcePath}/*"; DestDir: "{app}"; Flags: igNoreversion recursesubdirs createallsubdirs

[Dirs] 
    Name:"{app}\"; Permissions:everyone-modify

[UninstallDelete]
    Type: filesandordirs; Name: "{app}"
    ;删除快捷方式
    Type: filesandordirs; Name:"{group}\*"

               
;安装前先删除
[InstallDelete]
    ;Type: filesandordirs; Name: "{app}"
    ;删除快捷方式
    Type: filesandordirs; Name:"{group}\*"

[code]
    #include ".\inno_code\main.iss"
    //#include ".\inno_code\Code.iss"
